package me.exchange.com.modules.system.repository;

import me.exchange.com.modules.system.domain.Scroll;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

/**
 * @author zhaojing
 * @create2020/5/23
 */
public interface ScrollerRepository extends JpaRepository<Scroll,Long>, JpaSpecificationExecutor<Scroll> {

    /**
     * 根据id查询名称
     * @param id
     * @return
     */
    @Query(value = "select scrollName from sys_scroll where id = ?1",nativeQuery = true)
    String findNameById(Long id);
}
